PLANET NAMES
code:planet_names
const add 0
const add_ri 64
const add_ii 192
const sub 1
const sub_ri 65
const jeq 32
const jeq_ri 96
const jeq_ii 224
const jlt 34
const jlte 35
const sw 16
const sw_ri 80
const lw 17
const lw_ri 81
const call 8
const ret 9
const r0 0
const r1 1
const r2 2
const r3 3
const r4 4
const r5 5
const sp 5
const sp_offset 4
const counter 6
const input 7
const output 7
# init
add_ii
1
0
r4
label main
# read
add
input
r0
r1
# if in_space
jeq_ri
r4
1
capitalize
jeq
0
0
after_capitalize
# capitalize
label capitalize
sub_ri
r1
32
r1
add_ii
0
0
r4
label after_capitalize
# if whitespace(32)
jeq_ri
r1
32
set_head_flg
jeq
r0
r0
after_set_head_flg
label set_head_flg
add_ri
r4
1
r4
label after_set_head_flg
# write
add
r1
r0
output
jeq
r0
r0
main